package com.cssy.yd.logic.dao;

import com.cssy.yd.logic.entity.LogicOtherInwhItemDO;
import com.plat.helper.SearchConditions;

import java.util.List;
import org.springframework.dao.DataAccessException;

/**
 * 数据访问对象接口
 * @since 2013-05-23
 */
public interface LogicOtherInwhItemDAO {

    /**
     * 插入数据
     * @param logicOtherInwhItemDO
     * @return 插入数据的主键
     */
    public String insertLogicOtherInwhItemDO(LogicOtherInwhItemDO logicOtherInwhItemDO) throws DataAccessException;

    /**
     * 统计记录数
     * @param logicOtherInwhItemDO
     * @return 查出的记录数
     */
    public Integer countLogicOtherInwhItemDOByExample(LogicOtherInwhItemDO logicOtherInwhItemDO) throws DataAccessException;

    /**
     * 更新记录
     * @param logicOtherInwhItemDO
     * @return 受影响的行数
     */
    public Integer updateLogicOtherInwhItemDO(LogicOtherInwhItemDO logicOtherInwhItemDO) throws DataAccessException;

    /**
     * 获取对象列表
     * @param logicOtherInwhItemDO
     * @return 对象列表
     */
    public List<LogicOtherInwhItemDO> findListByExample(LogicOtherInwhItemDO logicOtherInwhItemDO) throws DataAccessException;

    /**
     * 根据主键获取logicOtherInwhItemDO
     * @param id
     * @return logicOtherInwhItemDO
     */
    public LogicOtherInwhItemDO findLogicOtherInwhItemDOByPrimaryKey(String id) throws DataAccessException;

    /**
     * 删除记录
     * @param id
     * @return 受影响的行数
     */
    public Integer deleteLogicOtherInwhItemDOByPrimaryKey(String id) throws DataAccessException;

    public List<LogicOtherInwhItemDO> find(SearchConditions scs) throws DataAccessException;
    
    public Integer count(SearchConditions scs) throws DataAccessException ; 

    /**
     * 根据其他入库单id查询所有的订单信息
     * @param pid
     * @return
     * @throws DataAccessException
     */
    public List<LogicOtherInwhItemDO> findByPid(String pid) throws DataAccessException;
    
    /**
     * 根据其他入库单ID删除所有信息
     * @param pid
     * @throws DataAccessException
     */
    public void deleteByPid(String pid) throws DataAccessException; 
}